package com.rzl.expense.expense.service.impl;

import java.util.List;
import com.rzl.expense.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rzl.expense.expense.mapper.TwrTowerBillBalanceMapper;
import com.rzl.expense.expense.domain.TwrTowerBillBalance;
import com.rzl.expense.expense.service.ITwrTowerBillBalanceService;

/**
 * 租赁费账单Service业务层处理
 * 
 * @author expense
 * @date 2024-11-27
 */
@Service
public class TwrTowerBillBalanceServiceImpl implements ITwrTowerBillBalanceService 
{
    @Autowired
    private TwrTowerBillBalanceMapper twrTowerBillBalanceMapper;

    /**
     * 查询租赁费账单
     * 
     * @param towerbillbalanceId 租赁费账单主键
     * @return 租赁费账单
     */
    @Override
    public TwrTowerBillBalance selectTwrTowerBillBalanceByTowerbillbalanceId(String towerbillbalanceId)
    {
        return twrTowerBillBalanceMapper.selectTwrTowerBillBalanceByTowerbillbalanceId(towerbillbalanceId);
    }

    /**
     * 查询租赁费账单列表
     * 
     * @param twrTowerBillBalance 租赁费账单
     * @return 租赁费账单
     */
    @Override
    public List<TwrTowerBillBalance> selectTwrTowerBillBalanceList(TwrTowerBillBalance twrTowerBillBalance)
    {
        return twrTowerBillBalanceMapper.selectTwrTowerBillBalanceList(twrTowerBillBalance);
    }

    /**
     * 新增租赁费账单
     * 
     * @param twrTowerBillBalance 租赁费账单
     * @return 结果
     */
    @Override
    public int insertTwrTowerBillBalance(TwrTowerBillBalance twrTowerBillBalance)
    {
        twrTowerBillBalance.setCreateTime(DateUtils.getNowDate());
        return twrTowerBillBalanceMapper.insertTwrTowerBillBalance(twrTowerBillBalance);
    }

    /**
     * 修改租赁费账单
     * 
     * @param twrTowerBillBalance 租赁费账单
     * @return 结果
     */
    @Override
    public int updateTwrTowerBillBalance(TwrTowerBillBalance twrTowerBillBalance)
    {
        twrTowerBillBalance.setUpdateTime(DateUtils.getNowDate());
        return twrTowerBillBalanceMapper.updateTwrTowerBillBalance(twrTowerBillBalance);
    }

    /**
     * 批量删除租赁费账单
     * 
     * @param towerbillbalanceIds 需要删除的租赁费账单主键
     * @return 结果
     */
    @Override
    public int deleteTwrTowerBillBalanceByTowerbillbalanceIds(String[] towerbillbalanceIds)
    {
        return twrTowerBillBalanceMapper.deleteTwrTowerBillBalanceByTowerbillbalanceIds(towerbillbalanceIds);
    }

    /**
     * 删除租赁费账单信息
     * 
     * @param towerbillbalanceId 租赁费账单主键
     * @return 结果
     */
    @Override
    public int deleteTwrTowerBillBalanceByDate(String accountPeroid)
    {
        return twrTowerBillBalanceMapper.deleteTwrTowerBillBalanceByDate(accountPeroid);
    }




    @Override
    public void batchTwrTowerBillBalance(List<TwrTowerBillBalance> list)
    {

         twrTowerBillBalanceMapper.batchTwrTowerBillBalance(list);
    }


}
